package com.qst.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.qst.system.mapper.LevelRewardMapper;
import com.qst.system.domain.LevelReward;
import com.qst.system.domain.vo.LevelRewardVo;
import com.qst.system.service.ILevelRewardService;

/**
 * 等级奖励Service业务层处理
 * 
 * @author linzhe
 * @date 2025-08-25
 */
@Service
public class LevelRewardServiceImpl implements ILevelRewardService 
{
    @Autowired
    private LevelRewardMapper levelRewardMapper;

    /**
     * 查询等级奖励
     * 
     * @param rewardId 等级奖励ID
     * @return 等级奖励
     */
    @Override
    public LevelRewardVo selectLevelRewardById(Long rewardId)
    {
        return levelRewardMapper.selectLevelRewardVoById(rewardId);
    }

    /**
     * 查询等级奖励列表
     * 
     * @param levelReward 等级奖励
     * @return 等级奖励
     */
    @Override
    public List<LevelRewardVo> selectLevelRewardList(LevelReward levelReward)
    {
        return levelRewardMapper.selectLevelRewardVoList(levelReward);
    }

    /**
     * 新增等级奖励
     * 
     * @param levelReward 等级奖励
     * @return 结果
     */
    @Override
    public int insertLevelReward(LevelReward levelReward)
    {
        return levelRewardMapper.insertLevelReward(levelReward);
    }

    /**
     * 修改等级奖励
     * 
     * @param levelReward 等级奖励
     * @return 结果
     */
    @Override
    public int updateLevelReward(LevelReward levelReward)
    {
        return levelRewardMapper.updateLevelReward(levelReward);
    }

    /**
     * 批量删除等级奖励
     * 
     * @param rewardIds 需要删除的等级奖励ID
     * @return 结果
     */
    @Override
    public int deleteLevelRewardByIds(Long[] rewardIds)
    {
        return levelRewardMapper.deleteLevelRewardByIds(rewardIds);
    }

    /**
     * 删除等级奖励信息
     * 
     * @param rewardId 等级奖励ID
     * @return 结果
     */
    @Override
    public int deleteLevelRewardById(Long rewardId)
    {
        return levelRewardMapper.deleteLevelRewardById(rewardId);
    }
}